<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CardsModel extends Model
{
    //绑定卡表
    protected $table='cards';

    //批量添加卡
    public static function AddCards($cards){
        return self::insert($cards);
    }

    //一对多与商品表关联
    public function product()
    {
        return $this->belongsTo('App\Models\ProductsModel','p_id','id');
    }


}
